Agenda

Starters

To add functionalities you must load the specific libraries - REMEMBER to make sure that they are installed in your system. If not you can install in RStudio on menu => Tools => Install Packages
or directly with command

## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1
## Loading required package: sp

My custom CRS projection Lambert Conical Conformal NOT secant but tangent at lat=45.827 and lon=11.625

My points (in lat long) over the regular grid/lattice these points are 666.67 m apart

## Reading layer `points' from data source `/archivio/R/shared/webinar/data/webinar1_2020_07_29/points.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1315 features and 1 field
## geometry type:  POINT
## dimension:      XY
## bbox:           xmin: 11.83267 ymin: 46.33037 xmax: 12.14322 ymax: 46.55611
## geographic CRS: WGS 84

Convert my points from lat long to my custom CRS projection

Run this line to view

Trick to create a rhomboid with a certain distance from the point (“radius”)
half the distance between points (333.33 m)

More complex function the includes another function

This line calls the above function

Assign the CRS to the new dataset

Convert to Latitude and Longitude for ingesting into Google Earth Engine

## Warning in CPL_crs_from_input(x): GDAL Message 1: +init=epsg:XXXX syntax is
## deprecated. It might return a CRS with a non-EPSG compliant axis order.

Save it to a shapefile … this shapefile will be uploaded to your
Google Earth Engine space

Import tiles.shp in GOOGLE EARTH ENGINE AND
DO THINGS code shared https://earthengine.googlesource.com/users/2020_Kanan/summer_webinar_series in script https://earthengine.googlesource.com/users/2020_Kanan/summer_webinar_series/+/636ab64efd7b09a0d45d3d10a992b8a44bd119c7/webinar1 AND EXPORT THE RESULTS TO A SHAPEFILE CALLED
tiles_withData.shp

Read the file exported from GEE

## Reading layer `tiles_withData' from data source `/archivio/R/shared/webinar/data/webinar1_2020_07_29/tiles_withData.shp' using driver `ESRI Shapefile'
## Simple feature collection with 1315 features and 6 fields
## geometry type:  POLYGON
## dimension:      XY
## bbox:           xmin: 11.82833 ymin: 46.32735 xmax: 12.14759 ymax: 46.55912
## geographic CRS: WGS 84

Create a new attribute column with the interquartile range
(The difference between p75 and p25)

Draw some results!!!!

Figure 2 - 50th Percentile (median)

## Warning: Found less unique colors (100) than unique zcol values (1041)! 
## Interpolating color vector to match number of zcol values.

Figure 2 - 10th Percentile

## Warning: Found less unique colors (100) than unique zcol values (1038)! 
## Interpolating color vector to match number of zcol values.

Figure 3 - Inter Quartile Range

## Warning: Found less unique colors (100) than unique zcol values (719)! 
## Interpolating color vector to match number of zcol values.